//
//  HMListenAnyTimeResViewModel.m
//  HowToDo
//
//  Created by mynSoo on 2017/1/5.
//  Copyright © 2017年 KY. All rights reserved.
//

#import "HMListenAnyTimeResViewModel.h"
#import "HMListenAnyTimeResModel.h"
#import "HMNetWorkTool.h"
#import <YYModel.h>

@implementation HMListenAnyTimeResViewModel

+ (void)loadListenAnyTimeRes:(NSString *)len andFinished:(void(^)(id responseObject))completedBlock Failed:(void(^)(NSError* error))failedBlock{
    [[HMNetWorkTool sharedTool]requestListenAnyTimeResJasonDataWithTimeLen:len andFinished:^(id responseObject) {
        
        
        NSDictionary *jsonDict = responseObject;
        NSArray *modelArray = [NSArray yy_modelArrayWithClass:[HMListenAnyTimeResModel class] json:jsonDict[@"data"]];
        
        completedBlock(modelArray);

    } Failed:^(NSError *error) {
        failedBlock(error);
    }];
}

@end
